/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 模糊匹配下拉菜单样式 */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: -1px;
  animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* 下拉菜单项样式 */
.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
  border-bottom: none;
  border-radius: 0 0 10px 10px;
}

.autocomplete-item:hover {
  background-color: #f5f5f5;
  color: #1976d2;
  transform: translateX(5px);
}

.autocomplete-item.selected {
  background-color: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

/* 输入框容器相对定位，确保下拉菜单定位正确 */
.form-group {
  position: relative;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url('../picture/F2.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #333;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景渐变遮罩 - 增强视觉层次感 */
body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 40, 80, 0.7) 100%);
  z-index: -1;
}

/* 背景光效 - 增强科技感 */
body::after {
  content: '';
  position: absolute;
  top: 20%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(25, 118, 210, 0.2) 0%, rgba(25, 118, 210, 0) 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulseLight 8s ease-in-out infinite alternate;
}

@keyframes pulseLight {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }

  100% {
    transform: scale(1.2);
    opacity: 0.5;
  }
}

/* 输入界面容器样式 */
.input-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(15px);
  animation: fadeIn 0.8s ease-out;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 标题样式 */
h1 {
  text-align: center;
  margin-bottom: 2.5rem;
  color: #1976d2;
  font-size: 2.4rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #1976d2 0%, #0d47a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: linear-gradient(90deg, rgba(25, 118, 210, 0) 0%, rgba(25, 118, 210, 0.8) 50%, rgba(25, 118, 210, 0) 100%);
}

/* 子标题样式 */
.menu-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.8rem;
  color: #1976d2;
  border-bottom: 3px solid #1976d2;
  padding-bottom: 0.8rem;
  position: relative;
}

.menu-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #ff9800;
  transition: width 0.3s ease;
}

.menu-title:hover::after {
  width: 100px;
}

/* 用户信息区域样式 */
.user-info-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(25, 118, 210, 0.1);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.user-info-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #1976d2 0%, #0d47a1 100%);
}

.user-info-section:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 输入网格布局 */
.input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  margin-bottom: 2rem;
}

/* 表单组样式 */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

/* 表单焦点状态的标签动画 */
.form-group:focus-within label {
  color: #1976d2;
  transform: translateX(5px);
}

/* 输入框样式 */
.form-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  box-sizing: border-box;
  font-size: 1rem;
  transition: all 0.3s ease;
  background-color: white;
  position: relative;
  z-index: 1;
}

/* 输入框内部发光效果 */
.form-group input::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 12px;
  background: linear-gradient(45deg, #1976d2, #0d47a1, #1976d2);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-group input:focus {
  border-color: #1976d2;
  outline: none;
  box-shadow: 0 0 0 5px rgba(25, 118, 210, 0.15);
}

.form-group input:hover {
  border-color: #90caf9;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.08);
}

/* 输入框值存在时的样式变化 */
.form-group input:not(:placeholder-shown) {
  border-color: #43a047;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.1);
}

/* 成绩输入网格布局 - 四行两列 */
.score-input-grid {
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid #ff9800;
}

.score-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.score-row:last-child {
  margin-bottom: 0;
}

.score-row .form-group {
  width: 48%;
  margin-bottom: 0;
}

/* 保存按钮样式 */
.save-btn {
  background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
  color: white;
  border: none;
  padding: 1.1rem 2.8rem;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(67, 160, 71, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.save-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
  z-index: -1;
}

.save-btn:hover {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67, 160, 71, 0.4);
}

.save-btn:hover::before {
  left: 100%;
}

.save-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(67, 160, 71, 0.3);
}

/* 功能选择区域样式 */
.function-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(25, 118, 210, 0.1);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.function-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #ff9800 0%, #f57c00 100%);
}

/* 功能按钮网格 - 三框并列布局 */
.function-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  width: 100%;
}

/* 功能按钮样式 */
.function-btn {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  border: none;
  padding: 1.3rem 1.5rem;
  font-size: 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.function-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.6s ease;
  z-index: -1;
}

.function-btn:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

.function-btn:hover::before {
  left: 100%;
}

/* 返回主页按钮样式 */
.back-btn {
  display: inline-block;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: white;
  border: none;
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.back-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: all 0.5s ease;
  z-index: -1;
}

.back-btn:hover {
  background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

.back-btn:hover::before {
  left: 100%;
}

.back-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

/* 页面加载动画 */
@keyframes pageLoad {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

body {
  animation: pageLoad 1s ease-out;
}

/* 表单提交动画 */
@keyframes submitSuccess {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(67, 160, 71, 0.5);
  }

  100% {
    transform: scale(1);
  }
}

.save-btn.submitted {
  animation: submitSuccess 0.5s ease-out;
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
  .input-container {
    max-width: 850px;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .input-container {
    padding: 2rem;
    margin: 1rem;
  }

  h1 {
    font-size: 1.9rem;
    margin-bottom: 2rem;
  }

  h1::after {
    bottom: -8px;
  }

  .menu-title {
    font-size: 1.3rem;
  }

  .score-input-grid {
    padding: 1.2rem;
  }

  .score-row {
    margin-bottom: 1.2rem;
  }

  .score-row .form-group {
    width: 100%;
    margin-bottom: 1.2rem;
  }

  .score-row:last-child .form-group:last-child {
    margin-bottom: 0;
  }

  .function-buttons {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .save-btn,
  .back-btn {
    width: 100%;
    padding: 1.1rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .input-container {
    padding: 1.5rem;
    margin: 0.5rem;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .menu-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .input-grid {
    gap: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.2rem;
  }

  .user-info-section,
  .function-section {
    padding: 1.5rem;
  }
}

@media (max-width: 360px) {
  .input-container {
    padding: 1.2rem;
    margin: 0.3rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .menu-title {
    font-size: 1.1rem;
  }
}